<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            border: 1px solid #000000;
        }
        #flexDiv{
            width: 800px;
            height: 500px;
            display: flex;
            /*X方向排列方式： left居左  right居右 center居中 space-between两端对齐*/
            justify-content: center;
            /*Y方向排列方式：flex-start 居上对齐 flex-end 居下对齐 center居中对齐*/
            align-items: flex-end;
        }

        #flexDiv div{
            width: 100px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>
<body>

    <div id="flexDiv">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
</body>
</html>